package com.pet.backend.controller;

import com.pet.backend.pojo.Home;
import com.pet.backend.pojo.Vo;
import com.pet.backend.service.impl.*;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  主页
 * </p>
 *
 * @author pet
 * @since 2024-07-13
 */
@CrossOrigin
@RestController
@RequestMapping("/home")
public class HomeController {

    @Resource
    private HomeServiceImpl homeService;

    // 首页
    @GetMapping
    public Vo<Home> home(){
        Home home = homeService.queryHome();
        return new Vo<>(true,home);
    }
}
